package com.cf.limit.core.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * game-server-Black
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/12 下午 05:16
 */
@Entity
@Table(name = "black", uniqueConstraints = {
        @UniqueConstraint(columnNames = {"ip"})
})
@CModel(pages = {
        @CPage(title = "黑名单列表", path = "black", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "黑名单", path = "black", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "黑名单", path = "black", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Black extends BaseEntity {

    @Column(name = "ip")
    @CField(lab = "封号Ip")
    private String ip;

    @Column(name = "blackTime")
    @CField(lab = "封号时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date blackTime = new Date();

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getBlackTime() {
        return blackTime;
    }

    public void setBlackTime(Date blackTime) {
        this.blackTime = blackTime;
    }
}
